package com.fph.design.strore.impl;

import com.alibaba.fastjson.JSON;
import com.fph.design.card.IQiYiCardService;
import com.fph.design.strore.ICommodity;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Map;

/**
 * 第三方兑换卡，实现发奖接口
 * @ClassName CardCommodityService
 * @Description TODO
 * @Author fph
 * @Date 2024-07-09 15:31
 **/
public class CardCommodityService implements ICommodity {

    private Logger logger = LoggerFactory.getLogger(CardCommodityService.class);

    private IQiYiCardService iQiYiCardService = new IQiYiCardService();

    @Override
    public void sendCommondity(String uID, String commodityId, String bizId, Map<String, String> extMap) throws Exception {
        String mobile = "19999999999";
        iQiYiCardService.grantToken(mobile, bizId);
        logger.info("请求参数[爱奇艺兑换卡] => uId：{} commodityId：{} bizId：{} extMap：{}", uID, commodityId, bizId, JSON.toJSON(extMap));
        logger.info("测试结果[爱奇艺兑换卡]：success");
    }
}

